package cn.itsource.easyexcel.write;

import cn.itsource.constant.Constant;
import cn.itsource.util.GenerateUserUtil;
import cn.itsource.vo.User2;
import com.alibaba.excel.EasyExcel;


/**
 * 按照指定的列的顺序写入
 */
public class WriteDemo5 {
    public static void main(String[] args) {
        String filename = Constant.BATH_URL + "user5.xlsx";
        // 向Excel中写入数据
        EasyExcel.write(filename, User2.class)
                .sheet("用户信息")
                .doWrite(GenerateUserUtil.getUser2Data());
    }
}
